
;;; ivy swiper counsel
(use-package ivy
  :ensure t
  :defer 2
  :config
  (setq ivy-use-virtual-buffers t)
  (setq ivy-count-format "(%d/%d) ")
  )

(use-package swiper
  :ensure t
  :defer 2
  :hook
  (ivy-mode . swiper-ensure)
  :config
  )
(use-package counsel
  :ensure t
  :defer 2
  )

;;基于ivy的标准命令接口
(global-set-key (kbd "C-x b" ) 'ivy-switch-buffer)
(global-set-key (kbd "C-s" ) 'swiper-isearch)
(global-set-key (kbd "M-x" ) 'counsel-M-x)
(global-set-key (kbd "C-x C-f" ) 'counsel-find-file)
(global-set-key (kbd "M-y" ) 'counsel-yank-pop)
(global-set-key (kbd "<f1> f" ) 'cousel-describe-function)
(global-set-key (kbd "<f1> v" ) 'cousel-describe-variable)
(global-set-key (kbd "<f1> l" ) 'counsel-find-library)
(global-set-key (kbd "<f2> i" ) 'counsel-info-lookup-symbol)
(global-set-key (kbd "<f2> u" ) 'counsel-unicode-char)
(global-set-key (kbd "<f2> j" ) 'cousel-set-variable)
(global-set-key (kbd "C-c c" ) 'cousel-compile)
;基于ivy的shell和系统工具接口
(global-set-key (kbd "C-c g" ) 'counsel-git)
(global-set-key (kbd "C-c j" ) 'counsel-git-grep)
(global-set-key (kbd "C-c L" ) 'counsel-git-log)
(global-set-key (kbd "C-c k" ) 'counsel-rg)
(global-set-key (kbd "C-c m" ) 'counsel-linux-app)
(global-set-key (kbd "C-c n" ) 'counsel-fzf)
(global-set-key (kbd "C-x l" ) 'cousel-locate)
(global-set-key (kbd "C-c J" ) 'counsel-file-jump)
(global-set-key (kbd "C-S-o" ) 'counsel-rhythmbox)
(global-set-key (kbd "C-c w" ) 'counsel-wmctrl)

;;; 命令提示
;(use-package which-key
;  :defer 3
;  :config (which-key-mode))



(provide 'init-command)
